﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" x:Name="userControl" x:Class="Skybot.NewWork.Graph.ElEntity"
    mc:Ignorable="d" 
             MouseEnter="userControl_MouseEnter_1"
             MouseLeave="userControl_MouseLeave_1"
             MouseLeftButtonDown="userControl_MouseLeftButtonDown_1"
             Cursor="Hand"
    d:DesignHeight="300" d:DesignWidth="400" RenderTransformOrigin="0.5,0.5">
	<UserControl.Resources> 
		<Storyboard x:Name="ZoomIn">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="userControl">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="1.5">
					<EasingDoubleKeyFrame.EasingFunction>
						<ElasticEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="userControl">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="1.5">
					<EasingDoubleKeyFrame.EasingFunction>
						<ElasticEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="ZoomOut">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="LayoutRoot">
				<EasingDoubleKeyFrame KeyTime="0" Value="1.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<ElasticEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="LayoutRoot">
				<EasingDoubleKeyFrame KeyTime="0" Value="1.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<ElasticEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources> 
	<UserControl.RenderTransform>
		<CompositeTransform/>
	</UserControl.RenderTransform>
    
	<i:Interaction.Triggers>
		<i:EventTrigger EventName="MouseEnter">
			<ei:PlaySoundAction Source="/908.mp3" Volume="1"/>
		</i:EventTrigger>
	</i:Interaction.Triggers>
    
    <Canvas x:Name="LayoutRoot" Background="White" RenderTransformOrigin="0.5,0.5">
    	<Canvas.RenderTransform>
    		<CompositeTransform/>
    	</Canvas.RenderTransform>
        <ContentControl Content="{Binding Ellipse}"/>
        <Border BorderBrush="#FF0A9CF9" BorderThickness="1" Background="White" Canvas.Top="-20">
        	<TextBlock TextWrapping="Wrap" Text="{Binding Title}" FontSize="12"/>
        </Border>
    </Canvas>
</UserControl>
